import style from "../assets/css/table.module.css";
import {
  AppOutline,
  AppstoreOutline,
  UnorderedListOutline,
  UserOutline,
  BellOutline,
} from "antd-mobile-icons";
import { useHistory } from "react-router-dom";

const Table = () => {
  // 得到history对象
  const history = useHistory();

  return (
    <div>
      <div className={style.table}>
        <div
          className={style.tableitem}
          onClick={() => {
            history.push({ pathname: "Home" });
          }}
        >
          <AppOutline />
          <div>首页</div>
        </div>

        <div
          className={style.tableitem}
          onClick={() => {
            history.push({ pathname: "Game" });
          }}
        >
          <UnorderedListOutline />
          <div>游戏</div>
        </div>

        <div className={style.tableitem}>
          <BellOutline />
          <div>送Q币</div>
        </div>

        <div
          className={style.tableitem}
          onClick={() => {
            history.push({ pathname: "SE" });
          }}
        >
          <AppstoreOutline />
          <div>软件</div>
        </div>

        <div
          className={style.tableitem}
          onClick={() => {
            history.push({ pathname: "My" });
          }}
        >
          <UserOutline />
          <div>管理</div>
        </div>
      </div>
    </div>
  );
};

export default Table;
